import App from './App'
import Vue from 'vue'
import uView from '@/uni_modules/uview-ui'
import mqtt from 'mqtt/dist/mqtt.min.js'
import env from '@/util/env.js'

App.mpType = 'app'

var client = mqtt.connect(env.mqttUrl, env.mqttOptions)

client.on('error', error => {
	console.log('连接失败', error)
})
client.on('connect', () => {
	console.log('连接成功')
})

Vue.prototype.mqtt = client
Vue.config.productionTip = false
Vue.use(uView)


const app = new Vue({
	...App
})
app.$mount()
